package com.pro.framework.api.enums;


import com.pro.framework.api.FrameworkConst;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * ObjectMapper策略枚举
 */
@Getter
@AllArgsConstructor
public enum EnumJsonObjectMapperStrategy {

    MVC("REST API序列化", false, FrameworkConst.JsonObjectMapper.mvcObjectMapper),

    CACHE("Redis缓存序列化", true, FrameworkConst.JsonObjectMapper.cacheObjectMapper),
    CACHE_SIMPLE("Redis缓存序列化", false, FrameworkConst.JsonObjectMapper.cacheObjectMapper),

    MESSAGE("消息通信序列化", false, FrameworkConst.JsonObjectMapper.messageObjectMapper),

    MULTI_TABLE_QUERY("多表联查特定序列化", false, FrameworkConst.JsonObjectMapper.multiTableQueryObjectMapper),
    ;

    private final String description;
    /**
     * 是否携带类型信息  例如  是: { "@class": "com.example.User",   "id": 123}  否: {"id": 123}
     */
    private final boolean withTypeInfo;

    private final String qualifierName;
}
